package com.lebang.controller.route;

import com.lebang.common.utils.OkHttpUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: hwq
 * @Date: 2020/11/20 13:38
 * @Version 1.0
 */
@RestController
public class RouteApi {

    Logger logger = LogManager.getLogger(this.getClass());


    /**
     * 统一转发入口
     */
    @RequestMapping(value = "/api/dev/count/v3")
    private String route(HttpServletRequest request, HttpServletResponse response, @RequestBody  String content) {

        Object result = null;

//            result = dispatch(request, response);
        String jsonObject = OkHttpUtil.postRequestJsonUn("http://search.gara.cc/api/dev/count/v3", content);


        return jsonObject;
    }

    /**
     * 统一转发入口
     */
    @RequestMapping(value = "/api/dev/check/v3")
    private String check(HttpServletRequest request, HttpServletResponse response, @RequestBody  String content) {



        String jsonObject = OkHttpUtil.postRequestJsonUn("http://search.gara.cc/api/dev/check/v3", content);


        return jsonObject;
    }


}
